<template>
  <div >
     <swiper>
      <swiper-item v-for="(item,index) in banner" :key="index">
        <a v-bind:herf="item.link">
          <img v-bind:src="item.image" @load="swiperImgload">
        </a>
      </swiper-item>
    </swiper>
  </div>
</template>
<script>
import{Swiper, SwiperItem}from "@/components/common/swiper"
export default {
  name:'HomeSwiper',
  components:{
    Swiper, 
    SwiperItem,
  },
  props:{
    banner:{
      type:Array,
      default:function(){
        return [];
      }
    }
  },
  data:function(){
    return{
      isload:false
      }
  },
  methods: {
    swiperImgload:function(){
      if(!this.isload){
        this.$emit('swiperImgload') ;
        this.isload=true;
      }
      
      
    }
  },
}
</script>
<style scoped>

</style>